//生成vite.config.js配置文件
//在项目根目录下执行命令：vite build --config vite.config.js


import { defineConfig } from "vite";

export default defineConfig({
  build: {
    lib: {
      entry: 'src/index.js',
      name: 'magic',
      formats: ['es', 'cjs', 'umd'],
      fileName: (format, entryName) => {
        return `${entryName}.${format}.js`
      }
    }
  },
  sourcemap: true
})
